<template>
  <div class="oneToOneDetails">
    <div class="head">
      <i class="iconfont head-icon" @click="comeBack">&#xe689;</i>
      希望工程一对一捐助
    </div>
    <div class="project-head-img">
      <img :src="imageUrl.imageUrl + eventAll.picture"/>
    </div>
    <div class="project-content">
      <div class="pro-content">
        <p style="line-height: 12px">
          <em class="content-title" v-html="eventAll.theme"></em>

          <!--<span class="contentnum">累计帮扶 <span class="howMany">{{eventAll.recipient}}</span> 名</span>-->
          <!--<span class="content-right">{{isM}}</span></p>-->
        </p>
        <p><span class="contentnum">累计帮扶 <span class="howMany">{{eventAll.recipient}}</span> 名</span></p>
        <div class="content-text" v-html="eventAll.sketch">
        </div>
      </div>
    </div>
    <div class="con-list">
      <div>
        <tab :line-width=2 v-model="index" custom-bar-width="" bar-active-color="#1AAC19">
          <tab-item class="vux-center" @on-item-click="witchShow = 'xiangqing'">
            项目详情
          </tab-item>
          <tab-item class="vux-center" @on-item-click="witchShow = 'danwei'">
            发起单位
          </tab-item>
          <tab-item class="vux-center" @on-item-click="jiedui">
            已结对
          </tab-item>
          <tab-item class="vux-center tab-item-xx" @on-item-click="witchShow = 'fankui'" v-if="eventAll.feedBack != '' && eventAll.feedBack.length > 0">
            信息反馈({{eventAll.feedBack.length}})
          </tab-item>
        </tab>
        <div class="details" v-if="witchShow == 'xiangqing'">
          <!--项目详情-->
          <div class="detailsContent" v-html="eventAll.content"></div>
          <div class="leaveT" v-show="leaveMessage.length > 0">
            <h2 class="lineLeft">捐赠留言</h2>
          </div>
          <div class="leave">
            <div class="leaveOneBox" v-for="leaveMessages in leaveMessage">
              <div class="avatarBox">
                <img :src="leaveMessages.headUrl" alt="">
              </div>
              <div class="contentBox">
                <p><span class="contentName" v-html="leaveMessages.nickname"></span> <span
                  class="contentTime">{{leaveMessages.time}}</span></p>
                <p class="liuyan" v-html="leaveMessages.content"></p>
                <p class="huifuicon" v-show="leaveMessages.relpy"><i class="iconfont"
                                                                     style="color: #1aac19;font-size: 16px;vertical-align: bottom">&#xe64a;</i>
                  回复</p>
                <p v-html="leaveMessages.relpy"></p>
              </div>
            </div>
          </div>
          <div style="color: #333333;font-size: 14px" @click="moreLeaverMessage" v-show="leaveMessage.length > 0">
            点击查看更多
          </div>
          <div class="btn">
            <flexbox>
              <flexbox-item v-show="eventAll.status == 1 && eventAll.need == 1">
                <x-button type="primary" @click.native="wantJuank"><i class="iconfont head-icon"
                                                                      style="font-size: 16px;">&#xe625;</i> 我要资助
                </x-button>
              </flexbox-item>
              <flexbox-item v-show="eventAll.status == 1 && eventAll.need == 0">
                <x-button type="primary"  @click.native="goHello"><i class="iconfont head-icon"
                                                         style="font-size: 16px;">&#xe625;</i> 感谢关注 请查看更多项目
                </x-button>
              </flexbox-item>
              <flexbox-item v-show="eventAll.status == 3">
                <x-button type="primary"  @click.native="goHello"><i class="iconfont head-icon"
                                                         style="font-size: 16px;">&#xe625;</i> 感谢关注 请查看更多项目
                </x-button>
              </flexbox-item>
            </flexbox>
          </div>
        </div>
        <div class="company" v-else-if="witchShow == 'danwei'">
          <!--发起单位-->
          <div class="pro">
            <div class="pro-image">
              <img :src="imageUrl.imageUrl + eventAll.organization[0].logo" alt="">
            </div>
            <h2 v-html="eventAll.organizationName"></h2>
            <h3>联系人：{{eventAll.organization[0].lianxiName}}</h3>
            <h4>联系电话：{{eventAll.organization[0].lianxiMobile}}</h4>
          </div>

          <div class="briefIntroduction">
            <!--组织简介-->
            <div class="briefIntroduction-box">
              <i class="iconfont head-icon" style="color: #379cee;">&#xe636;</i><span>组织简介</span>
            </div>
            <p v-html="eventAll.organization[0].organizationIntro"></p>
          </div>
          <div class="btn">
            <flexbox>
              <flexbox-item v-show="eventAll.status == 1 && eventAll.need == 1">
                <x-button type="primary" @click.native="wantJuank"><i class="iconfont head-icon"
                                                                      style="font-size: 16px;">&#xe625;</i> 我要资助
                </x-button>
              </flexbox-item>
              <flexbox-item v-show="eventAll.status == 1 && eventAll.need == 0">
                <x-button type="primary"  @click.native="goHello"><i class="iconfont head-icon"
                                                         style="font-size: 16px;">&#xe625;</i> 感谢关注 请查看更多项目
                </x-button>
              </flexbox-item>
              <flexbox-item v-show="eventAll.status == 3">
                <x-button type="primary"  @click.native="goHello"><i class="iconfont head-icon"
                                                         style="font-size: 16px;">&#xe625;</i> 感谢关注 请查看更多项目
                </x-button>
              </flexbox-item>
            </flexbox>
          </div>
        </div>
        <div class="record" v-else-if="witchShow == 'jilu'">
          <!--捐款记录-->
          <!--<div class="list">-->
          <!--<div class="aList" v-for="eventJuankuans in eventJuankuan">-->
          <!--<div class="aList-image">-->
          <!--<img :src="eventJuankuans.headUrl" alt="">-->
          <!--</div>-->
          <!--<div class="aList-content">-->
          <!--<span class="nickName">{{eventJuankuans.nickname}}</span>-->
          <!--<span class="aList-time" v-if="eventJuankuans.pastTime != ''">{{eventJuankuans.pastTime}}</span>-->
          <!--<span class="aList-money">捐助<em>{{eventJuankuans.amount}}</em>元</span>-->
          <!--</div>-->
          <!--</div>-->
          <!--</div>-->

          <div class="donateList">
            <div class="donateListOne" @click="goDonateListDetails(eventJuankuans.studentId,eventJuankuans.userId)"
                 v-for="eventJuankuans in eventJuankuan">
              <div class="donateListOneImage01">
                <img v-if="eventJuankuans.isNiming == 1" src="../../images/morentouxiang02.jpg" alt="">
                <img v-else="" :src="eventJuankuans.headUrl" alt="">
                <p v-if="eventJuankuans.isNiming == 1">爱心用户</p>
                <p v-else="">{{eventJuankuans.nickname}}</p>
              </div>
              <div class="middleBox">
                <p class="howDay">{{eventJuankuans.pastTime}}</p>
                <!--<p class="juanline"></p>-->
                <!--<i class="iconfont jiantou">&#xe9c7;</i>-->
                <p class="juanline">帮助了 <i class="iconfont">&#xe65a;</i></p>
                <p class="howDonation">捐助<span>{{eventJuankuans.amount}}</span>元</p>
              </div>
              <div class="donateListOneImage02">
                <!--<img v-if="eventJuankuans.photo != ''" class="donateListOneImageImg" :src="imageUrl.imageUrl + eventJuankuans.photo" alt="">-->
                <img v-if="eventJuankuans.sex == 'man'" class="donateListOneImageImg" src="../../images/man.png" alt="">
                <img v-else class="donateListOneImageImg" src="../../images/woman.png" alt="">
                <p>{{eventJuankuans.studentName}}</p>
              </div>
              <i class="iconfont rightjiantou">&#xe61a;</i>
            </div>
          </div>
          <div class="more-btn-box">
            <div class="more-btn" @click="moreOtherJuankuans" v-model="lookMoreJuankuans">{{lookMoreJuankuans}}</div>
          </div>

          <div class="btn">
            <flexbox>
              <flexbox-item v-show="eventAll.status == 1 && eventAll.need == 1">
                <x-button type="primary" @click.native="wantJuank"><i class="iconfont head-icon"
                                                                      style="font-size: 16px;">&#xe625;</i> 我要资助
                </x-button>
              </flexbox-item>
              <flexbox-item v-show="eventAll.status == 1 && eventAll.need == 0">
                <x-button type="primary"  @click.native="goHello"><i class="iconfont head-icon"
                                                         style="font-size: 16px;">&#xe625;</i> 感谢关注 请查看更多项目
                </x-button>
              </flexbox-item>
              <flexbox-item v-show="eventAll.status == 3">
                <x-button type="primary"  @click.native="goHello"><i class="iconfont head-icon"
                                                         style="font-size: 16px;">&#xe625;</i> 感谢关注 请查看更多项目
                </x-button>
              </flexbox-item>
            </flexbox>
          </div>
        </div>
        <div class="details" v-else-if="witchShow == 'fankui' && eventAll.feedBack != '' && eventAll.feedBack.length > 0">
          <!--<div class="detailsfeedback" v-if="eventAll.feedBack != ''" v-html="eventAll.feedBack[0].feedback"></div>-->
          <div class="detailsContent" v-if="eventAll.feedBack != '' && eventAll.feedBack.length > 0" v-for="feedBacks in eventAll.feedBack">
            <p><span v-html="feedBacks.pubUser"></span> <span style="float: right">{{feedBacks.pastTime}}</span></p>
            <p style="margin-bottom: 10px">已拨款{{feedBacks.money}}元</p>
            <div v-html="feedBacks.feedback"></div>
          </div>
          <div v-else>暂无信息反馈</div>
               <div class="btn">
                  <flexbox>
                    <flexbox-item v-show="eventAll.status == 1 && eventAll.need == 1">
                      <x-button type="primary" @click.native="wantJuank"><i class="iconfont head-icon"
                                                                            style="font-size: 16px;">&#xe625;</i> {{fankui_btn_text}}
                      </x-button>
                    </flexbox-item>
                    <flexbox-item v-show="eventAll.status == 1 && eventAll.need == 0">
                      <x-button type="primary"  @click.native="goHello"><i class="iconfont head-icon"
                                                               style="font-size: 16px;">&#xe625;</i> 感谢关注 请查看更多项目
                      </x-button>
                    </flexbox-item>
                    <flexbox-item v-show="eventAll.status == 3">
                      <x-button type="primary"  @click.native="goHello"><i class="iconfont head-icon"
                                                               style="font-size: 16px;">&#xe625;</i> 感谢关注 请查看更多项目
                      </x-button>
                    </flexbox-item>
                  </flexbox>
            </div>
        </div>
        <!--</swiper>-->
      </div>
    </div>
  </div>
</template>
<style lang="scss" src='./oneToOneDetails.scss'></style>
<script src="./oneToOneDetails.js"></script>
